<template>
  <avue-crud :data="data"
             :option="option">
    <template #menu="{size,row,index}">
      <el-button @click="tip(row,index)"
                 icon="el-icon-check"
                 text
                 type="primary"
                 :size="size">自定义菜单按钮</el-button>
    </template>
  </avue-crud>
</template>
<script>
export default {
  data () {
    return {
      data: [
        {
          name: '张三',
          sex: '男'
        }, {
          name: '李四',
          sex: '女'
        }
      ],
      option: {
        menuWidth: 380,
        column: [
          {
            label: '姓名',
            prop: 'name'
          }, {
            label: '性别',
            prop: 'sex'
          }
        ]
      },
    };
  },
  methods: {
    tip (row) {
      this.$message.success('自定义按钮' + JSON.stringify(row));
    }
  }
}
</script>